import http from "@/api/httpApi/base/http.js";

//获取管理员后台指令设置的列表
export const getCommandList = () => {
    return http.requestGet("/admin/command/list");
};

//添加管理员后台指令设置
export const addCommand = (map) => {
    return http.requestPost("/admin/command", map);
};

//修改管理员后台指令设置
export const updateCommand = (map) => {
    return http.requestPut("/admin/command", map);
};

//删除管理员后台指令设置
export const delCommand = (ids) => {
    return http.requestDeleteArr("/admin/command", "id", ids);
};

//执行命令
export const startCommandAdmin = (commandId, terminalId) => {
    return http.requestGet("/admin/command/start?commandId=" + commandId + "&mapId=" + terminalId);
};
